package cn.wolfcode.luowowo.web.controller;

import cn.wolfcode.luowowo.util.UploadUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {
    //上传图片
    @RequestMapping("/coverImageUpload")
    public Object uploadImg(MultipartFile pic) throws Exception {
        //接收传过来的pic文件二进制流
        //保存
        String path = UploadUtil.uploadAli(pic);
        return path;
    }

}
